//
//  CycleViewCollectionReusableView.m
//  22-ALiMusic
//
//  Created by dllo on 16/8/14.
//  Copyright © 2016年 ZHW. All rights reserved.
//

#import "CycleViewCollectionReusableView.h"
#import "ZHWCycleView.h"
#import "SmallData.h"

@interface CycleViewCollectionReusableView ()
@property (nonatomic, strong) NSMutableArray *dataSourecArr;
@end
@implementation CycleViewCollectionReusableView

- (void)setSmallDataArr:(NSArray<SmallData *> *)smallDataArr {
    _smallDataArr = smallDataArr;
    self.dataSourecArr = [NSMutableArray array];
    for (SmallData *smallData in smallDataArr) {
        [_dataSourecArr addObject:smallData.picUrl];
    }
    [self creatCycleView];

}

- (void)creatCycleView {
    if (_dataSourecArr) {
        ZHWCycleView *cycleView = [[ZHWCycleView alloc] initWithFrame:self.bounds DataSource:_dataSourecArr TimeInterval:3];
        [self addSubview:cycleView];
//        [cycleView reloadDataByArray:_dataSourecArr];
    }
}
@end
